package com.kt.common.clazz.field

class Address {


    /**
     * var <propertyName>[: <PropertyType>] [= <property_initializer>]
    [<getter>]
    [<setter>]
     */
    // kotlin 中属性可用var申明为可变的  也可以用val来声明为不可变的
    //get set 中需要使用到这个变量可以用field
    var name: String = "Holmes"
        get() = "name:$field"
    var street: String = "Baker"
        set(value) {
            field = "street:$value"
        }
    var city: String = "London"

    private var _table: HashMap<String, String>? = null
    public val table: HashMap<String, String>?
        get() {
            if (_table == null) {
                _table = HashMap()
            }
            return _table
        }


    //申明常量
    companion object{
        const val CONSTANT_A = "constant 111"
    }



}